<?php

function guessType($file){
  $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
  switch ($ext) {
  case 'jpg':
  case 'jpeg':
    return 'jpg';
  case 'gif';
    return 'gif';
  case 'png';
    return 'png';
  default:
    return 'jpg';
  }
}

/* End of file guess-file-type.php */
